package systempen.cmanager;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class AppPreferences {
     private static final String APP_SHARED_PREFS = "cmprefs"; 
     private SharedPreferences appSharedPrefs;
     private Editor prefsEditor;

     public AppPreferences(Context context)
     {
         this.appSharedPrefs = context.getSharedPreferences(APP_SHARED_PREFS, Activity.MODE_PRIVATE);
         this.prefsEditor = appSharedPrefs.edit();
     }

     public int getTheme() {
         return appSharedPrefs.getInt("THEME",0);
     }

     public void setTheme(int value) {
         prefsEditor.putInt("THEME", value);
         prefsEditor.commit();
     }
}